$INCLUDE: 'C:\FG\FASTGRAF.FI'

      PROGRAM MAIN

      INTEGER FRAMES, STATUS
      INTEGER*1 CONTEXT(16)
      INTEGER FG_FLICOPEN, FG_FLICPLAY

      CALL FG_INITPM
      CALL FG_SETMODE(19)

      STATUS = FG_FLICOPEN('GLASS.FLI'//CHAR(0),CONTEXT)
      IF (STATUS .EQ. 0) THEN
10       FRAMES = FG_FLICPLAY(CONTEXT,1,1)
         CALL FG_WAITKEY
         IF (FRAMES .GT. 0) GO TO 10
      CALL FG_FLICDONE(CONTEXT)
      END IF

      CALL FG_SETMODE(3)
      CALL FG_RESET

      IF (STATUS .EQ. -1) THEN
        STOP 'GLASS.FLI not found.'
      ELSE IF (STATUS .EQ. -2) THEN
        STOP 'GLASS.FLI is not an FLI or FLC file.'
      ELSE
        STOP ' '
      END IF
      END

